package com.henu.rescue.mapper;

import com.henu.rescue.entity.Category;
import com.henu.rescue.entity.TwoLevel;
import com.henu.rescue.entity.VO.CategoryAnalyse;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CategoryMapper {
    Integer updateNumById(Integer categoryId);

    String selectNameById(Integer id);

    List<Category> selectIdNameByX(Integer x);

    List<TwoLevel> selectIdNameY(Integer y);

    List<CategoryAnalyse> selectNatureByLevelId(Integer levelId);

    List<CategoryAnalyse> selectHuman();

    @MapKey("two_level_id")
    List<Map<Integer, String>> selectNamesByIds(@Param("ids") List<Integer> ids);
}
